import http from "@/http";
import { AdvertisementType, ListAdvertisementParm } from "./AdvertisementModel";
//新增
export const addAdvApi = (parm:AdvertisementType)=>{
    return http.post("/api/ad",parm)
}
//列表
export const getListApi = (parm:ListAdvertisementParm)=>{
    return http.get("/api/ad",parm)
}
//编辑
export const editAdvApi = (parm:AdvertisementType)=>{
    const url = `api/ad/${parm.advId}`
    return http.post(url,parm)
}
//删除
export const deleteAdvApi = (advId:string)=>{
    return http.get(`api/ad/${advId}`)
}